package com.gitee.melin.bee.core.grpc.advice;

import java.lang.annotation.*;

/**
 * huaixin 2022/1/28 9:58 AM
 */
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface GrpcExceptionHandler {

    /**
     * Exceptions handled by the annotated method.
     *
     * <p>If empty, will default to any exceptions listed in the method argument list.
     *
     * <p><b>Note:</b> When exception types are set within value, they are prioritized in mapping the exceptions over
     * listed method arguments. And in case method arguments are provided, they <b>must</b> match the types declared
     * with this value.
     */
    Class<? extends Throwable>[] value() default {};
}
